package com.chengyu.stock.job;

import com.chengyu.stock.service.StockTimerTaskService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

//定义股票采集任务bean
@Component
public class stockJob {

    @Autowired
    private StockTimerTaskService stockTimerTaskService;

    //定义采集国内大盘的方法
    @XxlJob("innerMarketTask")
    public void innerMarketTask(){
        stockTimerTaskService.collectInnerMarketInfo();
    }
    /**
     * 板块定时任务
     */
    @XxlJob("stockRtInfoTask")
    public void stockRtInfoTask(){
        stockTimerTaskService.collectStockInfos();
    }
}
